/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package resource.telsoft.place;

import java.io.Serializable;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

/**
 *
 * @author Bannt
 */
@ManagedBean
@SessionScoped
public class place implements Serializable{
    public static final String AUTH_REPORT_KEY = "au_key_report";
    public static final String AUTH_UTILITY_KEY = "au_key_utility";
    public String naviFunction()
    {
        FacesContext fc = FacesContext.getCurrentInstance();
        Map<String, String> params = fc.getExternalContext().getRequestParameterMap();
        String strUrl = (String) params.get("url");

//        System.out.println("strUrl: " + strUrl);

        if (strUrl.contains("mnReport"))
        {
            return "/faces/SCR/mnReport.xhtml?faces-redirect=true";
        } else
        {
            if (strUrl.contains("mnUtility"))
            {
//                return "/faces/Other/mnUtility.xhtml?faces-redirect=true";
                 return "/faces/SCR/mnUtility.xhtml?faces-redirect=true";
            } else
            {
                return "";
            }
        }
    }
}
